<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
	<title>First Name and Last Name</title>
	<script language="JavaScript">
		function showNames()
		{
			var currentDate = new Date();
			var hours = currentDate.getHours();
			var minutes = currentDate.getMinutes();
			var time = hours + ":";
			if(minutes < 10)
			{
				time += ("0" + minutes); 
			}
			else
			{
				time += minutes;
			}
			
			alert(document.mainForm.firstName.value + " " + document.mainForm.lastName.value + " " + time);
		}
	</script>
</head>
	
<body>
	<form name="mainForm" action="" method="post" onsubmit="showNames()">
		First Name: <input type="text" name="firstName" />
		<br />
		Last Name:<input type="text" name="lastName" />
		<br />
		<input type="submit" value="Submit"/>
	</form>
</body>
</html>